Skip to content

fix: ensure Python backend shm cleanup on forced shutdown#450

Open
Vinya567 wants to merge 1 commit into
mainfrom
vinyak/fix-jetson-shm-shutdown-cleanup
Open

fix: ensure Python backend shm cleanup on forced shutdown#450
Vinya567 wants to merge 1 commit into
mainfrom
vinyak/fix-jetson-shm-shutdown-cleanup

Conversation

@Vinya567

Copy link
Copy Markdown

What does the PR do?

Fix orphaned triton_python_backend_shm_region_* files when Python backend stub shutdown exceeds the server exit timeout (seen on IGX-Orin lifecycle CI).

Root cause

  • stub-timeout-seconds was parsed but not used during TerminateStub.
  • Parent-owned shm regions were only removed via RAII; forced shutdown could skip cleanup.

Fix

  • Wire stub_timeout_seconds through stub teardown with bounded wait/kill.
  • Call RemoveShmRegion() explicitly in TerminateStub.
  • Register parent shm regions for atexit cleanup as a safety net.

Related PRs

Test plan

  • Verified with server PR on IGX-Orin GitLab job 366443271 (L0_backend_python--IGX-Orin, lifecycle PASSED).

Checklist

  • PR title reflects the change and is of format <type>: <description>
  • Changes are described in the pull request.
  • Related PRs are referenced.

Register parent-owned shm regions for atexit cleanup, remove regions
explicitly in TerminateStub, and honor stub-timeout-seconds during stub
teardown to avoid orphaned regions when server exit times out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant